#ifndef FACTORY_H
#define FACTORY_H
#include "Codec.h"
#include "RequestCodec.h"
#include "ResponseCodec.h"
#include <string>

class CodecFactory {
public:
	CodecFactory();
	~CodecFactory();
	virtual Codec* createCodec();

};

class RequestFactory : public CodecFactory{
public:
	RequestFactory(std::string encstr);
	RequestFactory(RequestInfo* info);
	Codec* createCodec();
	~RequestFactory();

private:
	bool m_flag;
	std::string m_encstr;
	RequestInfo* m_info;
};

class ResponseFactory : public CodecFactory {
public:
	ResponseFactory(std::string encstr);
	ResponseFactory(ResponseInfo* info);
	Codec* createCodec();
	~ResponseFactory();

private:
	bool m_flag;
	std::string m_encstr;
	ResponseInfo* m_info;

};

#endif